Inspection method and system

ABSTRACT

An inspection method includes the following steps: identifying a plurality of patterns within an image; and comparing the plurality of patterns with each other for measurement values thereof. The above-mentioned inspection method uses the pattern within the image as a basis for comparison; therefore, measurement values of the plurality of pixels constructing the pattern can be processed with statistical methods and then compared, and the false rate caused by variation of a few pixels is decreased significantly. An inspection system implementing the above-mentioned method is also disclosed.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of application Ser. No. 13/073,253, filed Mar. 28, 2011 and entitled “INSPECTION METHOD AND SYSTEM,” the entire contents of the foregoing application are incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to an inspection method and system, and more particularly to an inspection method and system for determining an inconsistency in an image through pattern-to-pattern comparison.

2. Description of the Prior Art

How to inspect defects on a semiconductor device is one of the major subjects in a semiconductor manufacturing process. A prior art method for inspecting defects includes capturing a scanned image of a semiconductor device, such as a scanning electron microscope (SEM) image, and then determining the presence of a defect of the semiconductor device in the scanned image.

A defect determining method of prior art compares different images for inconsistency to determine whether there is any defect within the images. The comparison method is based on pixel-to-pixel comparison among images. For example, referring to FIG. 1a , each pixel 11 a within the image 1 a is compared with each corresponding pixel 11 b and 11 c within the image 1 b and 1 c. If one of the image (e.g. 1 a) is found inconsistent with the other images (e.g. 1 b, 1 c), a defect may be present within such inconsistent image (e.g. 1 a). For example, the pixel 12 a within the image 1 a may be a defect.

However, the pixel-to-pixel comparison shall increase false rate caused by gray level variation at edges of a pattern or single pixel. For example, the pixel 12 a within the image 1 a simply may be gray level variation induced while scanning image, or a defect which can be ignored.

Furthermore, it is more difficult to define patterns such as hole pattern, and positions of patterns by pixel based inspection. Referring to FIG. 1b , with the pixel based inspection, a plurality of pixels 12 b within the image 1 b can be determined as defects. However, unaware that the plurality of pixels 12 b all belongs to a hole pattern, the pixel-to-pixel comparison is unable to distinguish that the image where only a single defect pixel 12 a is present in the hole pattern is more likely to have a false defect than the image where the plurality of defect pixels 12 b are present in the hole pattern.

Accordingly, it is highly desirable to provide an inspection method to decrease the false rate.

SUMMARY OF THE INVENTION

The present invention is directed to an inspection method and system which compare patterns within one or more images based on an original design or predictable pattern. Therefore, the measurement value of a plurality of pixels constructing the pattern can be processed with statistical methods and then compared so that the false rate caused by the variation at the edge of the pattern or a few pixels is decreased.

In one embodiment, the proposed inspection method includes the following steps: identifying a plurality of patterns within an image; and comparing the plurality of patterns with each other for measurement values thereof.

In one embodiment, the proposed inspection system includes means for identifying a plurality of patterns within an image and means for comparing the plurality of patterns with each other for measurement values thereof.

In one embodiment, the proposed inspection method based on a database includes the following steps: scanning a surface of a specimen to obtain an image by using a scanning electron microscope (SEM); identifying a plurality of patterns within the image; and comparing the plurality of patterns including the same feature with each other for measurement values thereof, wherein the feature includes pattern types, pattern sizes, pattern locations, or any combination thereof.

In one embodiment, the proposed inspection system includes an image generating device, an image analyzing module and a comparison module. The image generating device is configured for detecting a surface of a specimen to generate an image. The image analyzing module is configured for receiving the image to identify a plurality of patterns within the image, wherein the plurality of patterns comprise holes, circuits, devices, or any combination thereof. The comparison module is configured for comparing the plurality of patterns including the same feature as each other for measurement values thereof, wherein the feature includes pattern types, pattern sizes, and pattern locations, or any combination thereof.

The objective, technologies, features and advantages of the present invention will become apparent from the following description in conjunction with the accompanying drawings wherein certain embodiments of the present invention are set forth by way of illustration and example.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing conceptions of this invention and their accompanying advantages will become more readily appreciated after being better understood by referring to the following detailed description, in conjunction with the accompanying drawings, wherein:

FIG. 1a and FIG. 1b are diagrams schematically illustrating an inconsistency determining step of an inspection method according to a prior art;

FIG. 2 is a flowchart schematically illustrating steps of an inspection method according to an embodiment of the present invention;

FIG. 3 is a diagrams schematically illustrating a part of an image of memory cell;

FIG. 4a and FIG. 4b are diagrams schematically illustrating an inconsistency determining step of an inspection method according to an embodiment of the present invention;

FIG. 5 is a flowchart schematically illustrating steps of an inspection method according to an embodiment of the present invention;

FIG. 6 is a block diagram schematically illustrating an inspection system according to an embodiment of the present invention; and

FIG. 7 is a diagram schematically illustrating an inspection system according to an embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

The detailed explanation of the present invention is described as follows. The described preferred embodiments are presented for purposes of illustrations and description, and they are not intended to limit the scope of the present invention.

Referring to FIG. 2, an inspection method of an embodiment of the present invention comprises identifying a plurality of patterns within an image (step S21); and comparing the plurality of patterns with each other for measurement values thereof (step S22) to identify defect. For example, the pattern can be a contact, via hole, a circuit, a device (such as an isolation device, MOS device, capacitor, or inductor etc.), or any combination thereof. In one embodiment, the patterns compared with each other include the same feature, such as pattern types, pattern sizes, pattern locations, pattern periods, etc.; and the measurement value may be gray level, color (This should not be in the target, please the inventors check), or brightness, etc. It should be noted that the patterns may be within one image or different images.

In one embodiment, the step S21 further comprises loading an original design layout file, such as graphic data system (GDS), open artwork system interchange standard (OASIS) or others. And, the image is aligned with the original design layout file; therefore a plurality of patterns within the image can be identified corresponding to the positions of those in the original design layout file. Alternatively, referring to FIG. 3, the patterns DP can be drawn on the image. For example, FIG. 3 illustrates a part of an image of memory cell which includes a few patterns that are the same and/or periods of repeat patterns, a period of which is shown as the region enclosed by dotted line. Corresponding to the drawn patterns DP, the patterns on the image with the same feature are identified and compared to identify defect.

It should be noted that the comparison in step S22 is based on the patterns, and every gray level of every pixel of each patterns are compared. For example, referring to FIG. 4a , the patterns 40 are defined by 9 pixels within the images 1 a, 1 b, and 1 c. When the patterns 40 within the images 1 a, 1 b, and 1 c are compared, measurement values (such as gray level) of the 9 pixels constructing the pattern 40 can be processed with statistical methods and then compared. For example, the measurement values of the pixels constructing the pattern 40 can be averaged and then compared. As illustrated in FIG. 4a , the pattern corresponding to the pattern 40 within the image 1 b includes a plurality of pixels 12 b with higher gray level (i.e. brighter pixel). Therefore, the averaged gray level of all pixels of the pattern within the image 1 b will be higher than the averaged gray level of corresponding pixels of the pattern within the image 1 a and 1 c, which indicates that the pattern within the image 1 b may be a defect.

Referring to FIG. 4b , the influence of variation of a single pixel 12 a on the average value of the pixels constructing the pattern is smaller and the defect pixel 12 a can be ignored. Accordingly, the false defect caused by variation of single pixel (as illustrated in FIG. 4b ) can be excluded. It should be noted that the more pixels the pattern is constructed of, the more tolerant the inspection is to the variation of pixels, and thereby reducing the false rate.

In one embodiment, the pixels with maximum or minimum measurement value and locations thereof are compared between the patterns, so that the distribution of the pixels with different measurement values with respect to the pattern can be defined. As mentioned earlier, the defect within the image 1 b can be determined by comparing the averaged gray level of the pixels constructing the pattern 40. Then, by analyzing the distribution of the pixels 12 b with different measurement values it is observed that the brighter pixels are distributed at edges of the pattern. Therefore, the defect within the image 1 b can be determined as a defect with a smaller than usual pattern. It should be noted that measurement values of the pixels constructing the patterns can be processed with other statistical methods, such as mode, standard deviation, median etc.

Referring to FIG. 5, an inspection method based on a database of an embodiment of the present invention comprises: scanning a surface of a specimen (such as a reticle or a wafer) to obtain an image by using a scanning electron microscope (SEM) (step S51); identifying a plurality of patterns within an image (step S52); and comparing the plurality of patterns with each other for measurement values thereof (step S53) to identify defect. The database is constructed by classifying and identifying every feature of patterns on an image by using the original design layout file, or by directly drawing every feature of patterns. The detail description of the steps S52 and S53 has been provided above and would be skipped here.

In one embodiment, the images can be obtained by using an optical means to capture a surface of a specimen. The optical means here includes any facility for inspecting or detecting inconsistency by using electromagnetic waves at different wavelengths.

Referring to FIG. 5, the inspection method of the present invention can implement conditional inspection (step S54). The conditional inspection means that the comparing step S53 focuses on the patterns with higher false rate, pattern of interesting, or defect of interesting etc. For example, referring to FIG. 3 again, the label G represents a gate electrode of MOS (Metal Oxide Semiconductor); the label N represents an n-type electrode of MOS; and the label P represents a p-type electrode of MOS. If the gray level of the plug N1 or N2 is bright, the plug G1 will be inspected, otherwise the plug G1 will not be inspected. Accordingly, the conditional inspection can save computing resources, reduce inspection duration, and facilitate trouble shooting. And based on the conditional inspection, the defect of interesting will be caught more easily.

According to an embodiment of the present invention, an inspection system comprises means for identifying a plurality of patterns within an image and means for comparing the plurality of patterns with each other for measurement values thereof. The inspection system implements the steps S21 and S22 as illustrated in FIG. 2. The detail description of the steps of the method of the present invention has been provided previously and will not be repeated here.

Referring to FIG. 6, which illustrates an inspection system according to an embodiment of the present invention. The inspection system comprises an image generating device 61, an image analyzing module 62 and a comparison module 63. The image generating device 61 may be a scanning electron microscope (SEM) to scan or an optical means to capture a surface of a specimen 60 to obtain an image. The image analyzing module 62 is configured for identifying different features of patterns on the image. The comparison module 63 is configured for comparing gray levels of patterns with the same feature. The comparison module 63 can implement the conditional inspection. The detail description of the feature identifying step and the comparing step has been provided above and would be skipped here.

Referring to FIG. 7, which illustrates an inspection system 7 according to an embodiment of the present invention. The inspection system 7 is used for inspecting a specimen 80 on a sample stage 79 and comprises a charged particle beam generator 71, a condenser lens module 72, a probe forming objective lens module 73, a charged particle beam deflection module 74, a secondary charged particle detector module 75, an image forming module 76, an image analyzing module 77 and a comparison module 78.

The charged particle beam generator 71 is used for generating a primary charged particle beam 701. The condenser lens module 72 is used for condensing the generated primary charged particle beam 701. The probe forming objective lens module 73 is used for focusing the condensed primary charged particle beam into a charged particle beam probe 702. The charged particle beam deflection module 74 is used to have the formed charged particle beam probe 702 to scan across a surface of the specimen 80 secured on the sample stage 79.

The secondary charged particle detector module 75 is used for detecting secondary charged particles 703 emitted from the surface of the specimen (may also be along with other reflected or scattered charged particles from the surface of the specimen) upon being bombarded with the charged particle beam probe 702 to generate a secondary charged particle detection signal 704. It should be noted that the secondary charged particle detector module 75 can be arranged at other place, such as the side of the charged particle beam deflection module 74 or the specimen 80, or between the charged particle beam deflection module 74 and the specimen 80.

The image forming module 76 is coupled with the secondary charged particle detector module 75 for receiving the secondary charged particle detection signal 704 from the secondary charged particle detector module 75 and forming at least one charged particle microscopic image accordingly. It should be noted that the image may display the structures on the surface of the specimen 80, and/or the structures underneath the surface. The image forming module 76 may be a mainframe host, terminals, personal computers, any kind of mobile computing devices or combination thereof. In addition, the image forming module 76 may be connected with the secondary charged particle detector module 75 through a medium selected from the following: cable wire, optical fiber cable, portable storage media, IR, Bluetooth, intranet, Internet, wireless network, wireless radio, or any combination thereof.

In one embodiment, the charged particle beam generator 71, the condenser lens module 72, the probe forming objective lens module 73, the charged particle beam deflection module 74, the secondary charged particle detector module 75 and the image forming module 76, or their equivalent designs, alternatives or any combination thereof, together form an image generating device which generates an image from detected secondary charged particles emitted from specimen 80 being bombarded with charged particle beam probe 702.

The above components of an inspection system are well known to those skilled in the art and are not presented here to limit the scope of the present invention. Alternatives, equivalents and modifications of these components should still be within the scope of disclosure of the present invention.

The image analyzing module 77 is coupled to the image forming module 76 to identify a plurality of patterns within the image received from image forming module 76. In one embodiment, the image analyzing module 77 connects to and accesses the image forming module 76 through a medium selected from the following: cable wire, optical fiber cable, portable storage media, IR, human manual input, Bluetooth, intranet, Internet, wireless network, wireless radio, or any combination thereof. Further, the image analyzing module 77 may be implemented as one selected from the following: a mainframe host, a terminal computer, a personal computer, any kind of mobile computing devices, or any combination thereof. The comparison module 78 is coupled to the image analyzing module 77 to compare the plurality of patterns including the same feature with each other for measurement values thereof. In one embodiment, computer programs for identifying the patterns and comparing measurement values of the patterns are encoded on computer readable media disposed within the image analyzing module 77 and the comparison module 78 so that the image analyzing module 77 and the comparison module 78 are able to perform the steps of inspection method illustrated in conjunction with FIG. 2.

To summarize the foregoing descriptions, the inspection method and system of the present invention use patterns within one or more images as a basis for comparison to determine inconsistency between patterns, therefore, the following advantages can be achieved: 1) Measurement values of a plurality of pixels constructing the pattern can be processed with statistical methods and then compared, and false rate especially caused by hole pattern, repeat patterns, edge of pattern, and variation of a few pixels is decreased significantly. 2) The inspection method and system of the present invention include the original design layout information, therefore the patterns, especially hole pattern, within the image is easy to define, and sensitivity of inspection is increased. 3) Patterns with different sizes, especially hole pattern, can be discriminated and compared exactly. 4) Conditional inspection can be implemented to decrease inspection duration significantly. 5) The defect determined from the image can be classified during inspection without ADC (automatic defect classification) training. 6) Critical dimension (CD) defect is easy to capture.

While the invention is susceptible to various modifications and alternative forms, a specific example thereof has been shown in the drawings and is herein described in detail. It should be understood, however, that the invention is not to be limited to the particular form disclosed, but to the contrary, the invention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the appended claims. 

What is claimed is:
 1. An inspection method for inspecting defects of a semiconductor device, comprising: identifying, within an image of the semiconductor device, a first plurality of patterns having a first feature, the first plurality of patterns functioning as a circuit of the semiconductor device; comparing statistical features associated with measurement values of the first plurality of patterns, wherein the comparing of the statistical features associated with the measurement values comprises: detecting whether at least one of the first plurality of patterns contains a defect, based on comparing averaged measurement values of the first plurality of patterns; and after at least one of the first plurality of patterns is detected to contain a defect, determining a distribution of the defect in the at least one of the first plurality of patterns, based on comparing, among the first plurality of patterns, locations of pixels with measurement values satisfying a predetermined statistical feature.
 2. The inspection method according to claim 1, wherein identifying the first plurality of patterns within the image of the semiconductor device is according to a design layout of the first plurality of patterns.
 3. The inspection method according to claim 1, wherein identifying the first plurality of patterns within the image of the semiconductor device comprises: loading an original design layout file.
 4. The inspection method according to claim 3, wherein the original design layout file comprises graphic data system (GDS) or open artwork system interchange standard (OASIS).
 5. The inspection method according to claim 3, wherein identifying the first plurality of patterns within the image of the semiconductor device comprises: aligning the image with the original design layout file.
 6. The inspection method according to claim 1, wherein identifying the first plurality of patterns within the image of the semiconductor device comprises: drawing the first plurality of patterns on the image.
 7. The inspection method according to claim 1, wherein the image is obtained by using a scanning electron microscope (SEM) to scan or an optical means to capture a surface of the semiconductor device.
 8. The inspection method according to claim 7, wherein the semiconductor device comprises a reticle or a wafer.
 9. The inspection method according to claim 1, wherein the measurement values are gray levels of pixels in the first plurality of patterns.
 10. The inspection method according to claim 1, wherein a measurement value satisfying the predetermined statistical feature is at least one of a maximum or minimum measurement value in a pattern.
 11. The inspection method according to claim 1, wherein comparing statistical features associated with measurement values of the first plurality of patterns comprises: selecting the first plurality of patterns at interest to be compared.
 12. The inspection method according to claim 1, wherein the first plurality of patterns comprises holes, circuits, devices, or any combination thereof.
 13. The inspection method according to claim 1, wherein the first plurality of patterns includes the same feature.
 14. The inspection method according to claim 13, wherein the first feature includes pattern types, pattern sizes, pattern locations, or any combination thereof.
 15. The inspection method according to claim 14, wherein the first feature includes pattern periods.
 16. An inspection method for inspecting defects of a semiconductor device, comprising: identifying, within an image of the semiconductor device, a first plurality of patterns having a first feature according to a design layout of the first plurality of patterns, the first plurality of patterns functioning as a circuit of the semiconductor device; comparing measurement values of the first plurality of patterns, wherein the comparing of the measurement values comprises: detecting whether at least one of the first plurality of patterns contains a defect, based on comparing averaged measurement values of the first plurality of patterns; and after at least one of the first plurality of patterns is detected to contain a defect, determining a distribution of the defect in the at least one of the first plurality of patterns, based on comparing, among the first plurality of patterns, locations of pixels with measurement values satisfying a predetermined condition.
 17. The inspection method according to claim 16, wherein comparing measurement values of the first plurality of patterns comprises: comparing statistical feature values of each pattern of the first plurality of patterns with each other for measurement values thereof.
 18. The inspection method according to claim 16, wherein identifying the first plurality of patterns within the image of the semiconductor device comprises: loading an original design layout file.
 19. The inspection method according to claim 18, wherein the original design layout file comprises graphic data system (GDS) or open artwork system interchange standard (OASIS).
 20. The inspection method according to claim 18, wherein identifying the first plurality of patterns within the image of the semiconductor device comprises: aligning the image with the original design layout file.
 21. The inspection method according to claim 16, wherein identifying the first plurality of patterns within the image of the semiconductor device comprises: drawing the first plurality of patterns on the image.
 22. The inspection method according to claim 16, wherein the image is obtained by using a scanning electron microscope (SEM) to scan or an optical means to capture a surface of the semiconductor device.
 23. The inspection method according to claim 22, wherein the semiconductor device comprises a reticle or a wafer.
 24. The inspection method according to claim 16, wherein comparing measurement values of the first plurality of patterns comprises: comparing the first plurality of patterns for every gray level of every pixel.
 25. The inspection method according to claim 16, wherein a measurement value satisfying the predetermined condition is at least one of a maximum or minimum measurement value in a pattern.
 26. The inspection method according to claim 16, wherein comparing measurement values of the first plurality of patterns comprises: selecting the first plurality of patterns at interest to be compared.
 27. The inspection method according to claim 16, wherein the first plurality of patterns comprises holes, circuits, devices, or any combination thereof.
 28. The inspection method according to claim 16, wherein the first plurality of patterns includes the same feature.
 29. The inspection method according to claim 28, wherein the first feature includes pattern types, pattern sizes, pattern locations, or any combination thereof.
 30. The inspection method according to claim 29, wherein the first feature includes pattern periods.
 31. An inspection system for inspecting defects of a semiconductor device, comprising a computing device configured to cause the inspection system to: identify, within an image of the semiconductor device, a first plurality of patterns having a first feature, the first plurality of patterns functioning as a circuit of the semiconductor device; compare statistical features associated with measurement values of the first plurality of patterns, and detect whether at least one of the first plurality of patterns contains a defect, based at least on comparing averaged measurement values of the first plurality of patterns; and after at least one of the first plurality of patterns is detected to contain a defect, determine a distribution of the defect in the at least one of the first plurality of patterns, based on comparing, among the first plurality of patterns, locations of pixels with measurement values satisfying a predetermined statistical feature.
 32. The inspection system according to claim 31, wherein the the computing device is further configured to identify the first plurality of patterns within the image of the semiconductor device according to a design layout of the first plurality of patterns.
 33. The inspection system according to claim 31, wherein in identifying the first plurality of patterns, the computing device is further configured to cause the inspection system to load an original design layout file or drawing the first plurality of patterns on the image.
 34. The inspection system according to claim 33, wherein the original design layout file comprises graphic data system (GDS) or open artwork system interchange standard (OASIS).
 35. The inspection system according to claim 33, wherein in identifying the first plurality of patterns, the computing device is further configured cause the inspection system to align the image with the original design layout file.
 36. The inspection system according to claim 31, wherein the image is obtained by using a scanning electron microscope (SEM) to scan or an optical imaging device to capture a surface of the semiconductor device.
 37. The inspection system according to claim 31, wherein in comparing the statistical features associated with the measurement values of the first plurality of patterns, the computing device is further configured to cause the inspection system to compare the first plurality of patterns for every gray level of every pixel.
 38. The inspection system according to claim 31, wherein a measurement value satisfying the predetermined statistical feature is at least one of a maximum or minimum measurement value in a pattern.
 39. The inspection system according to claim 31, wherein in comparing the statistical features associated with the measurement values of the first plurality of patterns, the computing device is further configured to cause the inspection system to select the first plurality of patterns at interest to be compared.
 40. The inspection system according to claim 31, wherein the first plurality of patterns comprises holes, circuits, devices, or any combination thereof.
 41. The inspection system according to claim 31, wherein the first plurality of patterns includes the same feature.
 42. The inspection system according to claim 41, wherein the first feature includes pattern types, pattern sizes, pattern locations, pattern periods, or any combination thereof.
 43. An inspection system for inspecting defects of a semiconductor device, comprising a computing device configured to cause the inspection system to: identify, within an image of the semiconductor device, a first plurality of patterns having a first feature according to a design layout of the first plurality of patterns, the first plurality of patterns functioning as a circuit of the semiconductor device; compare measurement values of the first plurality of patterns, and detect whether at least one of the first plurality of patterns contains a defect based at least on comparing averaged measurement values of the first plurality of patterns; and after at least one of the first plurality of patterns is detected to contain a defect, determine a distribution of the defect in the at least one of the first plurality of patterns, based on comparing, among the first plurality of patterns, locations of pixels with measurement values satisfying a predetermined condition.
 44. The inspection system according to claim 43, wherein the measurement values comprises statistical feature values, and the computing device is further configured to cause the inspection system to compare statistical feature values of each pattern of the first plurality of patterns with each other.
 45. The inspection system according to claim 43, wherein the means for in identifying the first plurality of patterns, the computing device is further configured to cause the inspection system to load an original design layout file or drawing the first plurality of patterns on the image.
 46. The inspection system according to claim 45, wherein the original design layout file comprises graphic data system (GDS) or open artwork system interchange standard (OASIS).
 47. The inspection system according to claim 45, wherein in identifying the first plurality of patterns, the computing device is further configured to cause the inspection system to align the image with the original design layout file.
 48. The inspection system according to claim 43, wherein the image is obtained by using a scanning electron microscope (SEM) to scan or an optical imaging device to capture a surface of the semiconductor device.
 49. The inspection system according to claim 43, wherein in comparing the statistical features associated with the measurement values of the first plurality of patterns, the computing device is further configured to cause the inspection system to compare the first plurality of patterns for every gray level of every pixel.
 50. The inspection system according to claim 43, wherein a measurement value satisfying the predetermined condition is at least one of a maximum or minimum measurement value in a pattern.
 51. The inspection system according to claim 43, wherein the means for in comparing the statistical features associated with the measurement values of the first plurality of patterns, the computing device is further configured to cause the inspection system to select the first plurality of patterns at interest to be compared.
 52. The inspection system according to claim 43, wherein the first plurality of patterns comprises holes, circuits, devices, or any combination thereof.
 53. The inspection system according to claim 43, wherein the first plurality of patterns includes the same feature.
 54. The inspection system according to claim 53, wherein the first feature includes pattern types, pattern sizes, pattern locations, pattern periods, or any combination thereof.
 55. The inspection method according to claim 1, further comprising: identifying, within the image of the semiconductor device, a second plurality of patterns having a second feature; after at least one of the first plurality of patterns is detected to contain a defect, detecting whether at least one of the second plurality of patterns contains a defect, based on comparing statistical features associated with measurement values of the second plurality of patterns, wherein when no defect is detected in the first plurality of patterns, the second plurality of patterns is not inspected for defects. 